package com.scalar.forecast.forecastSetup.actionCommands;

import com.scalar.forecast.commons.Constants;
import com.scalar.forecast.actionCommands.ActionCommand;

/**
 * User: Sujan Kumar
 * Date: Feb 8, 2005
 * Time: 6:05:07 PM
 */
public class ForecastSetupActionCommandFactory implements Constants {


    public static ActionCommand getActionCommand( String action )
    {
        if ( ACTION_SAVE.equalsIgnoreCase( action ) )
        {
            return new ForecastSetupSaveCommand();
        }
        if ( ACTION_CONFIRM.equalsIgnoreCase( action ) )
        {
            return new ForecastSetupConfirmCommand();
        }

        if ( ACTION_NEW.equalsIgnoreCase( action ) )
        {
            return new ForecastSetupNewCommand();
        }
        if ( ACTION_RELOAD_FORECAST_ENTRY_FIELDS.equalsIgnoreCase( action ) )
        {
            return new ForecastSetupReloadForecastEntryFieldsCommand();
        }
        if ( ACTION_ADD_NEW_LEVEL.equalsIgnoreCase( action ) )
        {
            return new ForecastSetupAddNewLevelCommand();
        }
        return null;
    }

}

